package org.xdq.代理模式.impl;

import org.xdq.代理模式.Inviter;

/**
 * 代理对象
 */
public class Mishu implements Inviter {

    private Inviter target;//所代理的目标对象

    public Mishu(Inviter target) {
        this.target = target;
    }

    public void setTarget(Inviter target) {
        this.target = target;
    }

    @Override
    public void invite() {
        System.out.println("我是秘书，大家就坐，开始吃吧！");
        target.invite();//执行目标对象的功能
        System.out.println("希望以后常聚！");

    }
}
